body {
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    flex-direction: column; /* 允许垂直居中 */
}

.register-container {
    background-color: #fff;
    background-size: cover;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 400px;
    text-align: center;
}

.register-container h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.register-container label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.register-container input[type="text"],
.register-container input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    font-size: 14px;
}

.register-container input[type="text"]:focus,
.register-container input[type="password"]:focus {
    border-color: #007BFF;
    outline: none;
}

.error-msg {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.5s ease-in-out;
}

.error-msg::before {
    content: "⚠️";
    font-size: 16px;
}

.error-msg:empty {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.register-container button {
    width: 100%;
    padding: 12px 0;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.register-container button:hover {
    background-color: #0056b3;
}